package com.bdqn.mapper;

import com.bdqn.pojo.Supplier;
import org.mybatis.spring.SqlSessionTemplate;

public class SupplierMappeImpl implements SupplierMapper{
    private SqlSessionTemplate sqlSession;

    @Override
    public int add(Supplier supplier) {
        return this.getSqlSession().getMapper(SupplierMapper.class).add(supplier);
    }

    @Override
    public int del(int supplierId) {
        return this.getSqlSession().getMapper(SupplierMapper.class).del(supplierId);
    }

    @Override
    public int update(Supplier supplier) {
        return this.getSqlSession().getMapper(SupplierMapper.class).update(supplier);
    }

    public SqlSessionTemplate getSqlSession() {
        return sqlSession;
    }

    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }


}
